home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)Z / (A)Z12.ADF / DRIVEM.ARC / ARCfile.41 / PrmFil.doc < prev    next >
Text File  |  1987-01-22  |  10KB  |  249 lines

  1. PrtDrvGen 1.1 / J°rgen Thomsen 870122
  2.  
  3. | Bugs corrected and enhancements in PrtDrvGen V1.1
  4. | =================================================
  5. | 1) The JFY1 (letter space, justify) and JFY2 (word fill, auto center)
  6. |    commands were not executed in V1.1 due to an AmigaDOS peculiarity
  7. |
  8. | 2) The description of parameters available for inclusion with the ^p, ^d,
  9. |    and ^w commands was missing from this file. Additonal information
  10. |    included as well
  11. |
  12. | 3) In case of the driver not being able to get enough memory for its
  13. |    buffers, it will output the string "No mem" to the printer.
  14.  
  15.  
  16. Setting up the parameter file for your brand of printer.
  17. ========================================================
  18.  
  19. In the following we assume that you want to generate a driver for your
  20. printer called MYPRINTER (the name may not contain spaces).
  21.  
  22. 1) Copy NECCP6.dat to MYPRINTER.dat
  23.  
  24. 2) Edit MYPRINTER.dat and change the NEC CP6 specific escape sequences to
  25.    the sequences required for your printer.
  26.    If wanted/needed change also the other parameters specifying the
  27.    operation of the driver.
  28. |  Do NOT add comments in lines with s:
  29. |  Do NOT totally delete any parameters that your printer may not need.
  30. |  PrtDrvGen expects them all to be there (eventually as empty strings
  31. |  in case of string parameters).
  32.  
  33.    Numerical parameters are provided with certain commands. Each parameter
  34.    is a byte, value 0 - 255.
  35.  
  36.    If you specify to the driver generator that an alphanumeric driver
  37.    without graphics should be generated, you will get a very small driver
  38.    with limited functionality e.g. Preferences will not be used for setting
  39.    up the printer, only the escape sequences specified. This may be OK for
  40.    very specific applications or for drivers (e.g. daisy wheel) with
  41.    limited graphical capabilities.
  42.  
  43.    The parameters available for inclusion into the escape sequences in
  44.    case of the full featured driver with the commands ^p, ^d and ^w are
  45.    as follows for the various printer commands:
  46. |  (NOTE. the ^d command can be used for debugging purposes because it
  47. |         will display in decimal notation (3 digits) the binary parameter
  48. |         value referenced by the ^p command).
  49.  
  50.    RIN:
  51.    ----
  52.  
  53.    Parameter 0: Lines per inch
  54.      ---     1: No of lines on one page (Preferences)
  55.      ---     2:      - - - - - -        (computed from form definition)
  56.      ---     3: No of lines to skip at perforation ( - - - - )
  57.      ---     4: Left margin  (Preferences, first column to write, Amiga std.)
  58.      ---     5: Right margin (Preferences,  last column to write,   ----    )
  59.      ---     6: Left  margin - 1 (last column not to write, NEC standard)
  60.      ---     7: Right margin + 1 (first column not to write,    ----    )
  61.  
  62.    All others:
  63.    -----------
  64.  
  65.    Parameters 0 - 7 are the ones provided with the command, if any.
  66.    Additionally the following parameters are available:
  67.  
  68.      IND, NEL, RI:
  69.         Parameter 0: line count before command
  70.            ---    1: line count after command
  71.  
  72.      SFC, SBC:
  73.         Parameter 0: as provided by command
  74.            ---    1: Parameter 0 MOD 10
  75.            ---    2: value from colortable[Parameter 1]
  76.  
  77.      STBM:
  78.         Parameter 0: current no of lines to skip at perforation
  79.            ---    1: current no of lines on page (paper length)
  80.            ---    2: Parameter 1 - Parameter 0
  81.  
  82.      SLPP:
  83.         Parameter 0: current no of lines on page (paper size)
  84.            ---    1: current no of lines to skip at perforation
  85.            ---    2: Parameter 0 - Parameter 1
  86.  
  87.      SLRM, CAM:
  88.         Parameter 0: as provided (CAM: 1)
  89.            ---    1: as provided (CAM: computed)
  90.            ---    2: Parameter 0 - 1
  91.            ---    3: Parameter 1 + 1
  92.  
  93.      PLD, PLU:
  94.         Parameter 0: (length specified in parameter file) * (6 or 8)/8
  95.  
  96.  
  97. | To use this driver for a black and white only printer do the following:
  98. | change "Printer Class" to 1 and "Color Class" to 1. There is no need
  99. | to change the "Sequence for printing colors" parameters.
  100.  
  101. | The colors specified in the SFC and SBC are the printer specific colors
  102. | and will only be used if your program actually uses the SFC and SBC
  103. | commands with an embedded ^p2/^d2/^w2 command.
  104.  
  105. | Inkjet and laser printers will often print one line of dots at a time.
  106. | Most often that would require the "Storage of dots in buffer" parameter
  107. | to be specified as 0 and "No of Raster Rows on each pass" as 1.
  108.  
  109. To clarify the parameters for storing dots in the buffer the following
  110. figure of one pass (line) of a print head is presented:
  111.  
  112.            X ->
  113.         Y  0
  114.         0  :::::::::::::::::::::::::::::::::::
  115.            :::::::::::::::::::::::::::::::::::
  116.            :::::::::::::::::::::::::::::::::::
  117.            :::::::::::::::::::::::::::::::::::
  118.  
  119. The dots may be stored in consecutive bytes as
  120.  
  121.  a) Column by column, left to right
  122.     Byte 1: [(0,0), (0,1), (0,2) .... (0,7)]  Byte 2: [(1,0),  (1,1)...]
  123.  
  124.  b) Column by column, right to left
  125.     Byte 1: [(0,7), (0,6), (0,5) .... (0,0)]  Byte 2: [(1,7),  (1,6)...]
  126.  
  127.  c) Row by row, left to right
  128.     Byte 1: [(0,0), (1,0), (2,0) .... (7,0)]  Byte 2: [(8,0),  (9,0)...]
  129.  
  130.  d) Row by row, right to left
  131.     Byte 1: [(7,0), (6,0), (5,0) .... (0,0)]  Byte 2: [(15,0), (14,0)...]
  132.  
  133.  
  134. | The parameters available for inclusion by the ^p, ^d, and ^w commands when
  135. | writing graphics are the following:
  136. |
  137. |   Parameter "0-1"     Parameter "2-3"
  138. |   [xxxxxxxx xxxxxxxx] [xxxxxxxx xxxxxxxx]
  139. |     ^p0       ^p1         ^p2      ^p3        binary bytes
  140. |     ^d0       ^d1         ^d2      ^d3        3 digit decimal bytes
  141. |     ^w0                   ^w2                 5 digit decimal words
  142. |
  143. |   Parameter "0-1" = ^p0 * 256 + ^p1 = ^w0
  144. |
  145. |   At "Init graphics before/after delay":
  146. |        Parameter "0-1": no of dot columns to receive in each pass (line)
  147. |           ---    "2-3": no of dots in each column
  148. |
  149. |      These strings are output to the printer at the very beginning of
  150. |      the graphics dump. The delay between them allows for a lengthy
  151. |      reset command to finish and the printer to become ready for the
  152. |      following commands if that is needed.
  153. |      This part should be used for initializing the printer with values
  154. |      which are constant throughout the entire graphics dump e.g.
  155. |      unidirectional printing, proper line spacing to avoid white
  156. |      streaks in the picture etc.
  157. |
  158. |   At "Color x prefix" and "Each single buffer terminated by":
  159. |        Parameter "0-1": as above + no of dot columns added to the left
  160. |                         margin in order to center picture
  161. |
  162. |           ---    "2-3": no of bytes actually used for the graphics data
  163. |                         for one pass (line) (size of <data for color x>
  164. |                         below). In case of a 24 pin dot matrix printer
  165. |                         parameter 1 = 24/8 * parameter 0. For an 8 pin
  166. |                         dot matrix printer parameter 1 = parameter 0.
  167. |
  168. |        Make sure, that the dots per inch density you typically will
  169. |        specify to the printer in these prefixes, are in accordance
  170. |        with the "Max dots in X direction" and "Dots pr. inch in X
  171. |        direction" parameters, which AmigaDOS will use for generating
  172. |        the graphics data for the printer.
  173. |
  174. |        A typical prefix would contain:
  175. |         <CR> <select print color> <specify graphics mode and no of
  176. |                                    bytes/columns of data to follow>
  177. |
  178. |      The pass (line) buffer layout is:
  179. |        <color 1 prefix> <data for color 1>
  180. |        <color 2 prefix> <data for color 2>
  181. |        <color 3 prefix> <data for color 3>
  182. |        <color 4 prefix> <data for color 4> <Each s. buf. term. by>
  183. |
  184. |      The contens of the prefixes for the NEC CP6 driver is:
  185. |      <CR> <select print color> <specify graphics mode and how many pin
  186. |      columns of data to follow>
  187. |      
  188. |   At "Finish graphics dump":
  189. |        No parameter values available.
  190. |
  191. |      This string (e.g. a form feed and set printer back to normal text
  192. |      state, if that is needed) is output at the very end of the
  193. |      graphics dump.
  194.  
  195.  
  196.  
  197. Generating the driver.
  198. ======================
  199.  
  200. Make sure, that the files MYPRINTER.dat and PrtDrv.lod are located in the
  201. current directory. The driver generated will be located in the current
  202. directory with the name MYPRINTER.
  203.  
  204. Execute the driver generator PrtDrvGen
  205.  
  206.                PrtDrvGen
  207.  
  208. and respond to the prompt for "Alphanumeric driver without graphics (y/n)"
  209. and "Printer driver name: " (the latter being MYPRINTER).
  210.  
  211. Generating the driver lasts appr. 30 sec. (alphamuneric) or 1.5 minute.
  212. The sizes of the generated drivers when loaded are approx. 1 Kb and 10.5 Kb.
  213.  
  214. To make the driver available for AmigaDOS do the following:
  215.  
  216.     Copy MYPRINTER To DEVS:printers
  217.  
  218. With Preferences do:
  219.  
  220.     AmigaDOS 1.1:
  221.        change the printer to Custom and specify MYPRINTER as Custom Printer
  222.        Name.
  223.        After a warm boot (ctrl-Amiga-Amiga) the driver can be used
  224.  
  225.     AmigaDOS 1.2:
  226.        change the printer to MYPRINTER
  227.  
  228.  
  229. |Using the driver
  230. |================
  231. |
  232. |The AmigaDOS printer device code and the printer specific code (printer
  233. |drivers) will not be loaded into memory until the first output operation
  234. |to the printer is performed. You may experience, that after this load
  235. |nothing happens. This is most likely because the driver could not get
  236. |enough contiguous memory for its buffers.
  237. |
  238. |The code of this driver is due to the added features larger than most
  239. |other drivers, but it will in case of memory shortage reduce its memory
  240. |requirements and execute in a slower mode. If sufficient contiguous memory
  241. |is still not available, it will print the string "No mem" on the printer
  242. |to inform you about this.
  243. |
  244. |You may avoid this by setting margins narrower with Preferences. That will
  245. |produce a smaller picture, but it will reduce the memory requirements.
  246. |You may also choose to print with less density, if your printer supports
  247. |more than a single dots-per-inch mode.
  248.